package com.xd.core.business.mapper;

import com.github.pagehelper.Page;
import com.xd.core.bill.dto.OverduePolicyRefundQuery;
import com.xd.core.bill.vo.OverduePolicyRefundVo;
import com.xd.core.business.dto.GuaranteeQueryDto;
import com.xd.core.business.dto.GuaranteeReviewDto;
import com.xd.core.business.entity.GuaranteeSlip;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xd.core.business.vo.GuaranteePageVo;
import com.xd.core.business.vo.ReviewVo;
import com.xd.core.debt.vo.GuaranteeSlipVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 保单表 Mapper 接口
 * </p>
 *
 * @author ZX
 * @since 2025-06-20
 */
public interface GuaranteeSlipMapper extends BaseMapper<GuaranteeSlip> {

    Page<GuaranteePageVo> getGuaranteeList(@Param("dto") GuaranteeQueryDto dto,@Param("companyId") Integer companyId,@Param("userIds") List<Integer> userIds);

    void guaranteeReview(@Param("dto") GuaranteeReviewDto dto);

    ReviewVo getReview(Integer guaranteeId);

    void batcUpdateStatus(List<Integer> policyId);

    Page<OverduePolicyRefundVo> getOverduePolicyRefundList(@Param("query") OverduePolicyRefundQuery query,@Param("companyId") Integer companyId,@Param("userIds") List<Integer> userIds);

    void updateStatus(List<String> policyList);

    void batchInsert(List<GuaranteeSlip> guaranteeSlips);

    Integer getGuaranteeId(@Param("carNo") String carNo,@Param("incomingOrder") String incomingOrder);


    void updateUrl(Integer guaranteeId);

    String getTotalNumber(Integer incomingId);

    List<GuaranteeSlipVo> getGuaranteeVo(Integer incomingId);

    void applySurrender(List<GuaranteeSlipVo> list);
}
